<template>
  <div class="container">
    <div class="list">
      <div class="title-wrap">
        <div class="title">2019年第2季度</div>
      </div>
      <div v-for="(item,index) in list" :key="item.deptName" class="row van-ellipsis">
        <span class="num">{{index+1}}</span>{{item.deptName}}
        <span class="score">{{item.totalScore}}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['list'],
  data () {
    return {}
  }
}
</script>
<style lang="less" scoped>
.container {
  padding: 20px;
  .list {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    .title-wrap {
      border-bottom: 1px solid #eee;
      padding-bottom: 15px;
      .title {
        display: inline-block;
        background-color: #ee4532;
        color: #fff;
        padding: 8px;
        line-height: 1;
        border-radius: 6px;
      }
    }
    .row {
      margin: 20px 0;
      line-height: 20px;
      height: 20px;
      position: relative;
      padding-right: 30px;
      .num {
        line-height: 20px;
        height: 20px;
        font-weight: bold;
        margin-right: 10px;
        display: inline-block;
        width: 20px;
        text-align: right;
      }
      .score {
        position: absolute;
        top: 0;
        right: 0;
        line-height: 20px;
        height: 20px;
        color: #ee4532;
        font-weight: bold;
      }
    }
  }
}
</style>
